package com.atguigu.flyweight;

public class FlyWeight {
	
	public static void main(String[] args) {
		
		Integer a = Integer.valueOf(127);
		Integer b = new Integer(127);
		
		Integer c = Integer.valueOf(127);
		Integer d = new Integer(127);
		
		System.out.println(a.equals(b)); // true
		
		System.out.println(a == b); // false
		System.out.println(a == c); // true
		System.out.println(a == d); // false
		System.out.println(d == b); // false
	}
	
}